home *** CD-ROM | disk | FTP | other *** search
- --
- -- Handles the screen output for single
- and single class choices.
- --
-
- on initStudentNum
- global studentNum, choiceFlag
-
- if choiceFlag = "ind,s,class"
- then set studentNum = 0
-
- end initStudentNum
-
- --
- on initRecords
- global theGame, studentNum, currentTeacher,
- whichStudent, currentStudent
- global gameString, programString,
- currentClassRecord, choiceFlag, gameName
-
- if item 1 of choiceFlag = "ind" and item 3 of
- choiceFlag = "class" then
- set studentNum = studentNum + 1
- if studentNum > (the number of lines in
- currentClassRecord) then
- exitRecords
- exit
- end if
- set whichStudent = item 1 of line
- studentNum of currentClassRecord
- else
- set whichStudent = currentStudent
- end if
-
- set theGame = 1
- set whichGame =
- line theGame of gameString
- set gameName =
- line theGame of programString
- set theRecord =
- formatRecord( whichGame, gameName )
-
- set the text of field "currentTeacher" to
- ("Student:" && whichStudent & "
- Teacher:" && currentTeacher)
-
- puppetSprite 12, true
- if gameName = "Sort bdp" then
- set the locH of sprite 12 to 409
- else
- set the locH of sprite 12 to 1000
- end if
- puppetSprite 12, false
-
-
- setRecordText theRecord
-
- cursor 128
- updateStage
-
- end initRecords
-
- --
-
- on nextRecord
- global theGame, theLine, gameString,
- programString, choiceFlag
- global theFlush, gameName
-
- set the castNum of sprite 17 =
- (the number of cast "nextScr.blank")
- set the castNum of sprite 18 =
- (the number of cast "lastScr.blank")
- updateStage
-
- set theGame = theGame + 1
- if theGame > (the number of
- lines in gameString) then
- if choiceFlag = "ind,s,class"
- then initRecords
- else exitRecords
- exit
- end if
-
- set whichGame = line theGame
- of gameString
- set gameName = line theGame of
- programString
- set theRecord = formatRecord
- (whichGame,gameName)
-
-
- puppetSprite 12, true
- if "Sort bdp, Bridge, Balloons"
- contains gameName then
- set the locH of sprite 12 to 409
- else
- set the locH of sprite 12 to 1000
- end if
- puppetSprite 12, false
-
- setRecordText theRecord
-
- theFlush(mFlush)
-
- end nextRecord
-
- --
-
- on exitRecords
- global currentTeacher,
- choiceFlag, theFlush
-
- allSpritesOff
-
- if choiceFlag = "ind,s,single"
- then go "Single"
- else go "Reports"
-
- set the text of field "currentTeacher"
- to currentTeacher
-
- theFlush(mFlush)
-
- end exitRecords
-
- --
-
- on exitClassRecords
- global currentTeacher
-
- allSpritesOff
-
- go "Reports"
- set the text of field "currentTeacher"
- to currentTeacher
-
- end exitClassRecords
-
- --
-
- on formatRecord whichGame, gameName
- global incUnit, whichStudent,
- currentTeacher, thePath, Record,
- programString, theGame
-
- set target = whichGame & ":" & currentTeacher
- & ":" & whichStudent
- set incUnit = FileIO(mNew, "read",
- thePath & "Records:Scores:" & target)
-
- if not objectP(incUnit) then
- set theProblem = string( incUnit )
- if theProblem = "-43" then
- set theRecord =
- ("No data exists for" && gameName)
- return theRecord
- exit
- else
- put alert string
- ("error type" && theProblem)
- end if
- end if
-
- set theRecord = incUnit(mReadFile)
- incUnit(mDispose)
-
- set fRecord = ""
- set sP = " "
- repeat with i = 1 to
- (the number of lines in theRecord)
-
- set incString = line i of theRecord
-
- if item 4 of incString = "-" then
- set timeChar = " "
- else set timeChar = item 4 of incString
-
- if item 5 of incString = "-"
- then set helpChar = " "
- else set helpChar = item 5 of incString
-
- set recString = item 1 of incString & chars
- (sP,1,3) & item 2 of incString & chars(sP,1,3)Â
- & item 3 of incString & chars(sP,1,5)
- & timeChar & chars(sP,1,12)Â
- & helpChar & RETURN
-
- set fRecord = fRecord & recString
-
- end repeat
-
- set fRecord = chars
- (fRecord,1,length(fRecord) - 1)
- set fRecord = (line theGame of programString
- & RETURN & RETURN & fRecord)
-
- return fRecord
-
- end formatRecord
-
- -- RESET
- -- RESET
- -- RESET
- -- RESET
- -- RESET
- -- RESET
- -- RESET
- -- RESET
- -- RESET
- -- RESET
- -- RESET
- -- RESET
- -- RESET
- -- RESET
- -- RESET
- -- RESET
- -- RESET
- -- RESET
- -- RESET
- -- RESET
- -- RESET
- -- RESET
- -- RESET
- -- RESET
- -- RESET
- -- RESET
- -- RESET
- -- RESET
- -- RESET
- -- RESET
- -- RESET
- -- RESET
- -- RESET
-
-
-